package com.acane.instagram.feature.collection

import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
import androidx.navigation.compose.composable


const val COLLECT_ROUTE = "collect"


fun NavGraphBuilder.collectionScreen(
    navController: NavHostController,
    toProfile: (String) -> Unit,
    toPost: (String, Int) -> Unit,
    toCollectionList: (Int) -> Unit,
) {

    composable(
        COLLECT_ROUTE
    ) {
        CollectionRoute(
            navController = navController,
            toPost = toPost,
            toProfile = toProfile,
            toCollectionList = toCollectionList,
        )
    }
//    composable(
//        "$COLLECT_ROUTE/{$COLLECTION_POST_POSITION}"
//    ) {
//        CollectionRoute(
//            navController = navController,
//            toPost = toPost,
//            toProfile = toProfile,
//        )
////        backStackentry ->
////        val userId = SessionManager.currentUser?.id
////        val postPosition = backStackentry.arguments!!.getInt(COLLECTION_POST_POSITION)
////
////        CollectionPostList(
////            toProfile = toProfile,
////            navController = navController,
////            userId = userId,
////            postPosition = postPosition,
////        )
//    }
}
//fun NavController.navigateToCollection(postPosition: Int): Unit {
//    navigate("${COLLECT_ROUTE}/$postPosition")
//}
fun NavController.navigateToCollection(): Unit {
    navigate(COLLECT_ROUTE)
}
